<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/hdocs/style/css/login.css" type="text/css" rel="stylesheet" />
<link href="/hdocs/style/css/common.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/hdocs/jquery/js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="/hdocs/style/js/common.js"></script>
<title>瓜朋网-登录</title>
<script type="text/javascript">
$(document).ready(function() {
	$("#email").blur(function() {
		var email = $("#email").val();
		if(email==null||email==''){
			$("#email_info").html("请输入email");
			return;
		}
		$.getJSON("/missPassword/validateEmail.json",{email: email}, function(result) {
			$("#email_info").html(result.message);
			return;
		});
		$("#email_info").html("OK");
	});
	$("#submitBtn").click(function() {
		if(validateForm()){
			$("#mainForm").submit();
		}
	});
	$("#changeImg").click(function() {
		var url = "/validateCode?code=checkcode&temp="+Math.random();
		$("#checkImg").attr("src",url);
	});
});

function validateForm(){
	if ($("#email").val() == "") {
		alert("请输入email！");
		$("#email").focus();
		return false;
	}
	if ($("#checkcode").val() == "") {
		alert("请输入验证码！");
		$("#checkcode").focus();
		return false;
	}
	return true;
}

</script>
</head>
<body>
	#set ($menuIndex="index") #parse("/inc/header.html")
	<div class="centent">
		<div class="cenLe">
			<form id="mainForm" onsubmit="return validateForm();" method=post name="Login" action="/missPassword/sendEmail.jsp">
			<div class="login">
				<h2 style="color:#4c7e17;">找回密码</h2>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>Email</span><input id="email" name="email" type="text" class="logInt" />
					<p id="email_info" class="saTyle">请输入email</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>验证码</span>
					<input id="checkcode" name="checkcode" type="text" value="$!account.checkcode" class="logInt yanz" />
					<em class="yzNo"><img id="checkImg" width="99" height="31" src="/validateCode?code=checkcode"/></em>
					<p class="saTyle">
						看不清？<a id="changeImg" href="javascript:void(0);">换一张</a>
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<a id="submitBtn" href="javascript:void(0);" class="loginBtn">发送邮件</a>
			</div>
			</form>
		</div>
		<div class="cenRi">
			<div class="gpUser">
			</div>
		</div>
	</div>
	#parse("/inc/footer.html")
</body>
</html>
